***********************************************************************************************************************
*PURPOSE: Replication Files for "Lower Court Influence on High Courts: Evidence from the Supreme Court of the United Kingdom"
*AUTHORS: Jennifer Bowie, Ali S. Masood, Elisha Savchack, Natalie L. Smith, Bianca Wieck, Cameron Abrams, and Meghna Melkote 
*DATE: July 25, 2023
***********************************************************************************************************************


***********************************************************************************************************************
*Load Data
use "UK_Borrowing_Data_JLC.dta"

xtset  justicenum


*Main Model 1 with Year Justice Effects
xtreg percentmatch10 oa_ideolcong affirm salience_flip  lcdissent_flip logwords fresh logcaseload lcreadingease lcpassive, fe


*Main Model 2 with Year and Justice and Year Fixed Effects
xtreg percentmatch10 oa_ideolcong affirm salience_flip  lcdissent_flip logwords fresh logcaseload lcreadingease lcpassive i.year, fe


*Main Model 3 with Year and Justice Fixed Effects and Block Bootstrap Errors 
bootstrap, reps(1000) seed(1) cluster(justicenum): xtreg percentmatch10 oa_ideolcong affirm salience_flip  lcdissent_flip logwords fresh logcaseload lcreadingease lcpassive i.year, fe

*Figure: Impact of Opinion Length on Language Borrowing in the UK Supreme Court
margins, at (logwords=(4.5(1)10.5))

marginsplot, recast(line) plotopts(lwidth(medthick)) recastci(rarea) ciopt(color(gs14)) scheme(white_hue) title("") ytitle("Predicted Opinion % Borrowed") xtitle("Court of Appeal Opinion Length")
***********************************************************************************************************************


***********************************************************************************************************************
*Appendix Models

*Appendix Table 1 - Descriptive Statistics
sum oa_ideolcong affirm salience_flip  lcdissent_flip logwords fresh logcaseload lcreadingease lcpassive percentmatch10

*Appendix Figure - Distribution of DV
hist percentmatch10, scheme(white_hue)

*Appendix Table 2 - Alternate DV
bootstrap, reps(1000) seed(1) cluster(justicenum): xtreg percentmatch6 oa_ideolcong affirm salience_flip  lcdissent_flip logwords fresh logcaseload lcreadingease lcpassive i.year, fe cformat(%5.2f)

*Appendix Table 3 - Raw Number of Words
bootstrap, reps(1000) seed(1) cluster(justicenum): xtreg percentmatch10 oa_ideolcong affirm salience_flip  lcdissent_flip lcwords fresh logcaseload lcreadingease lcpassive i.year, fe cformat(%5.2f)

*Appendix Table 4 - Alternate Measure for Ideological Distance
bootstrap, reps(1000) seed(1) cluster(justicenum): xtreg percentmatch10 idc_flip affirm salience_flip  lcdissent_flip logwords fresh logcaseload lcreadingease lcpassive i.year, fe cformat(%5.2f)

*Appendix Table 5 - Wild Cluster Bootstrap
wildbootstrap xtreg percentmatch10 idc_flip affirm salience_flip  lcdissent_flip logwords fresh logcaseload lcreadingease lcpassive i.year, fe cformat(%5.2f)
***********************************************************************************************************************

